package chan.project.smartlawdatamanage.config;

import chan.project.smartlawdatamanage.elastic.SimpleCanalClientExample;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class AppRunner implements CommandLineRunner {

    @Resource
    private SimpleCanalClientExample canalClient;

    @Override
    public void run(String... args) {
        new Thread(canalClient::startListening).start();
    }
}